#ifndef TEXTEDITOR_H
#define TEXTEDITOR_H

#include <QMainWindow>
#include <QString>
namespace Ui {
    class TextEditor;
}

class TextEditor : public QMainWindow
{
    Q_OBJECT

public:
    explicit TextEditor(QWidget *parent = 0);
    ~TextEditor();

private:
    Ui::TextEditor *ui;

    QString curFile;
    bool isSaved;
    bool saveFile(const QString& fileName);
    void saveFielOrNot();
    bool loadFile(const QString &fileNmme);
    void saveFileAs();
private slots:
    void on_actionAboutQt_triggered();
    void on_actionAbout_triggered();
    void on_action_Quit_triggered();
    void on_action_SaveAs_triggered();
    void on_action_Save_triggered();
    void on_action_Open_triggered();
    void on_action_New_triggered();
};

#endif // TEXTEDITOR_H
